package com.hilatest.osgi;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;

public class ClientActiviator implements BundleActivator {


	public void start(BundleContext context) throws Exception {
		//获取服务的方法
		ServiceReference<?> ref =
			context.getServiceReference(Greeting.class.getName());     
	    ((Greeting) context.getService(ref)).sayHello();  

	}

	public void stop(BundleContext context) throws Exception {}

}
